﻿using System;
using System.Collections.Generic;
using BusinessLogic.Models.ValidationAttributes;
using Interfaces.Models;
using Microsoft.Practices.EnterpriseLibrary.Validation.Validators;

namespace BusinessLogic.Models.LogicModels.Economic
{
    public class Company : ICompany
    {
        [NotNullValidator(Tag = RulesKeys.Required)]
        public Guid Id { get; set; }
        
        [StringLengthValidator(50,5,Tag = RulesKeys.StringLength)]
        public string Name { get; set; }

        [StringLengthValidator(20, 1, Tag = RulesKeys.StringLength)]
        [NotNullValidator(Tag = RulesKeys.Required)]
        public string Symbol { get; set; }
        
        [ObjectValidator]
        public IIndustry Industry { get; set; }
        
        [ObjectCollectionValidator]
        public ICollection<IQuote> Quoteis { get; set; }
    }
}
